/** \file    refine/grey_mask.h
  * \brief   Moves across the mask bounds and adds or removes single pixels to it 
  *			 or marks pixels with grey color as uncertain, according to color ditribution in image.
  * \date    2003
  * \author  Fedor Chelnokov
  * \version $Header: /home/cscom1r4/cvsroot/cs/include/refine/grey_mask.h,v 1.1 2004/02/04 14:43:24 cscom1r4 Exp $
  */

#ifndef _refine_grey_mask_h_
#define _refine_grey_mask_h_

#include "types.h"

namespace refine {

namespace grey_mask {

struct params {
	int		window_half_size;
	float	predominance;
	int		enough_statistics;
	bool	soft_mask;
	bool	self_development;
	bool	minimize_test_count;
	bool	silent;
};
extern const params default_params;

///image and mask are taken from different sources
void refine(const byte_image & src, mask & m, const params & p = default_params);

///(r,g,b) channels are source images that will be unchanged
///alpha channel contains mask to modify
void refine(byte_image & img, const params & p = default_params);

} //namespace grey_mask

} //namespace refine

#endif //_refine_grey_mask_h_